home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
netprog.zip
/
NETPROG.TAR
/
lib
/
lock.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-12-17
|
232b
|
20 lines
/*
* Locking routines for 4.3BSD.
*/
#include <sys/file.h>
my_lock(fd)
int fd;
{
if (flock(fd, LOCK_EX) == -1)
err_sys("can't LOCK_EX");
}
my_unlock(fd)
int fd;
{
if (flock(fd, LOCK_UN) == -1)
err_sys("can't LOCK_UN");
}